package com.old.mapper;

import com.github.pagehelper.Page;
import com.old.entity.Activity;
import com.old.entity.Post;
import com.old.entity.Video;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AdminMapper {

    //获取待审核帖子
    @Select("Select * from post where isShow = 0 order by create_time DESC ")
    Page<Post> getPostList(Integer sortBy, String searchTerms);
    //获取待审核视频
    @Select("Select * from video where isShow = 0 order by create_time DESC ")
    Page<Video> getVideoList(Integer sortBy, String searchTerms);
    //获取待审核活动-活动表isShow审核态为2
    @Select("Select * from activity where isShow = 2 order by create_time DESC ")
    Page<Activity> getActivityList(Integer sortBy, String searchTerms);

    //内容管理-post
    @Select("Select * from post order by create_time DESC ")
    Page<Post> getPostListContent(Integer sortBy, String searchTerms);
    //内容管理-video
    @Select("Select * from video order by create_time DESC ")
    Page<Video> getVideoListContent(Integer sortBy, String searchTerms);
    //内容管理-activity
    @Select("Select * from activity order by create_time DESC ")
    Page<Activity> getActivityListContent(Integer sortBy, String searchTerms);
}
